package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.MerchantContract;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MerchantContractMapper extends TYBaseMapper<MerchantContract> {

    /**
     * 按商户编号查询合同信息
     *
     * @param merchantCodes
     * @return
     */
    List<MerchantContract> findContractList(@Param("list") List<String> merchantCodes);

    /**
     * 按商户编号查询合同信息
     *
     * @param merchantCodes
     * @return
     */
    List<MerchantContract> findEffectiveContract(@Param("list") List<String> merchantCodes, @Param("date") String date);

    /**
     * 按时间查询合同
     *
     * @param date
     * @return
     */
    List<MerchantContract> findContractByDate(@Param("list") List<String> listStr, @Param("date") String date);

    /**
     * 按时间查询合同
     *
     * @param date
     * @return
     */
    List<MerchantContract> findContractByInDate(@Param("list") List<String> listStr, @Param("date") String date);

    /**
     * 按商户编号及有效期查询是否有合同信息
     *
     * @param merchantVO
     * @return
     */
    List<MerchantContract> findMerchantByCode(@Param("vo") MerchantContract merchantVO);

}
